<template>
    <div class="app-container">
        <router-link :to="{name:'equipmentOrders_list'}">
            <el-button  type='primary' v-waves>返回
            </el-button>
        </router-link>
        <div style="display:block;margin-top:40px;text-align:left;font-size:20px">订单详情</div>
        <div>
             <div>订单状态：{{list.orderStatus == 1 ? '未支付' : list.orderStatus == 2 ? '待支付' : '已完成'}}</div>
            <div>租用费用：{{list.totalPrice}}</div>
        </div>
        <div>
            <div>订单编号：{{list.orderId}}</div>
            <div>优惠券抵扣：{{list.couponPrice}}</div>
        </div>
        <div>
            <div>用户手机号：{{list.usersPhone}}</div>
            <div>积分抵扣: {{list.couponScore}}</div>
        </div>
        <div>
            <div>用户昵称：{{list.nickName}}</div>
            <div>支付方式：{{list.payType == 1 ? '余额' : list.payType == 2 ? '微信' : list.payType == 3 ? '微信公众号' : '信用卡'}}</div>
        </div>
        <div>
            <div>充电宝ID：{{list.batteryId}}</div>
            <div>支付币种：{{list.payType == 1 ? '人民币' : '澳大利亚币' }}</div>
        </div>
        <div>
            <div>借用地点：{{list.businessAddress}}</div> 
            <div>实付款：{{list.actualPrice}}</div>
        </div>
         <div>
            <div>租借时间：{{list.leaseStartTime  | parseTime}}</div> 
            <div>支付时间：{{list.payTime | parseTime}}</div>
        </div>
         <div>
            <div>归还时间：{{list.leaseEndTime | parseTime}}</div> 
            <div>支付时汇率：{{list.todayExchangeMoney}}</div>
        </div>
         <div>
            <div>使用时长：{{useTime}}</div> 
            <div></div> 
        </div>
        <div style="display:block;margin-top:40px;text-align:left;font-size:20px">信用卡支付信息</div>
         <div>
            <div>ABN：{{list.abn}}</div>
            <div>GST：{{list.gst}}</div>
        </div>
        <div>
            <div>信用卡号：{{bankList.userId}}</div> 
            <div>订单号：{{list.orderId}}</div>
        </div>
         <div>
            <div>银行名称：{{bankList.creditType?bankList.creditType:''}}</div>
            <div>支付时间：{{list.payTime | parseTime}}</div>
            
        </div>
    </div>
</template>
<script>
import { getOrderInfo } from '@/api/equipmentOrders';
import { getdTime } from '@/utils/index'
export default {
    name:'equipmentOrders_detail',
    data(){
        return{
           orderId:this.$route.query.orderId,
           list:{},
           bankList:{},
           useTime: ''
        }       
    },
    methods:{
        //获取设备订单详情
        async getDetail(){
            if(!this.orderId){
                return
            }
            const {data}=await getOrderInfo({
                orderId :this.orderId
            })
            this.list=data.order
            this.bankList=data.creditCar?data.creditCar:''
            console.log('111111111=',data.creditCar)
            if(this.list.leaseStartTime && this.list.leaseEndTime) {
                this.useTime = getdTime(this.list.leaseStartTime, this.list.leaseEndTime)
            }else {
                this.useTime = '-----------'
            }
            
            console.log(this.bankList)
        },        
    },
    created(){
        this.getDetail()
    },
    computed: {
        
     }
}
</script>
<style lang="scss" scoped>
.app-container>div{
    display: flex;
    justify-content: space-around;
    line-height:60px;
    color:#606266;
    div{
        width:400px;  
    }
}

</style>


